import 'package:flutter/material.dart';

class MyApp5 extends StatelessWidget {
  MyApp5({super.key});
  String name = '小美';
  num? age;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //导航条
      appBar: AppBar(
        title: const Text(
          'Container组件',
          style: TextStyle(color: Colors.white, fontSize: 20),
        ),
        backgroundColor: Colors.pink,
        centerTitle: true,
      ),
      body: Center(
        child: Container(
          width: 300,
          height: 300,
          decoration: BoxDecoration(
            color: Colors.blue[200],
            border: Border.all(color: Colors.yellow, width: 10),
            borderRadius: BorderRadius.circular(20),
          ),
          child: Container(
            alignment: Alignment.center,
            color: Colors.pink[200],
            margin: const EdgeInsets.all(20),
            padding: const EdgeInsets.all(20),
            child: const Text(
              '我是一个Container',
              style: TextStyle(color: Colors.white, fontSize: 20),
            ),
          ),
        ),
      ),
    );
  }
}
